package sz.szsmk.citizencard.ui.base;

import android.os.Build;
import android.os.Bundle;
import androidx.fragment.app.FragmentActivity;

import android.view.WindowManager;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;


public abstract class SuperActivity extends FragmentActivity {

    public static final int HANDLER_REQUEST_FAILED = 0;
    public static final int HANDLER_NO_NETWORK = 1;

    public static final int REQUEST_AUTH_LOGIN_CODE = 9999;

    public static final int RQF_PAY = 100;
    public static final int RQF_LOGIN = 200;

    public static long firstime = 0;
    public static final int VCODE_TIME = 90000;

    public static boolean isForeground = true;

    //公用titlebar
    public LinearLayout btnLeft;
    public ImageView imageLeft;
    public TextView textTitle;
    public LinearLayout btnRight;
    public ImageView imageRight;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
            getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
            getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
        }
    }

    /**
     * 初始化View
     */
    protected abstract void findViewId();

    /**
     * 初始化数据
     */
    protected abstract void initData();

    /**
     * 设置监听事件
     */
    protected abstract void setListener();

}

